﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Quark.Profiler.Framework
{
    /// <summary>
    /// 测试服务端的测试管理服务接口
    /// </summary>
    [ServiceContract]
    public interface IQuarkDistributedProfilingManagementService
    {
        /// <summary>
        /// 卸载并清理当前已装载的测试项目
        /// </summary>
        [OperationContract()]
        void UnloadProjects();
        /// <summary>
        /// 加载并准备好指定的测试项目
        /// </summary>
        /// <param name="projectId">测试项目ID</param>
        [OperationContract()]
        void PrepareTestProject(string projectId);
        /// <summary>
        /// 启动并运行指定的测试项目
        /// </summary>
        /// <param name="projectId">测试项目ID</param>
        /// <param name="delaySeconds">在启动之前延时的秒数</param>
        [OperationContract()]
        void StartTest(string projectId, int delaySeconds);
        /// <summary>
        /// 停止指定的测试项目
        /// </summary>
        /// <param name="projectId">测试项目ID</param>
        [OperationContract()]
        void StopTest(string projectId);
        /// <summary>
        /// 停止所有正在运行的测试项目
        /// </summary>
        [OperationContract()]
        void StopAllTests();
    }
}
